import request from '@/utils/http.js'


// 保存秒杀活动
export const saveSeckillApi = (data) => {
  return request({
    url: 'sms/backend/sPromotion/save',
    method: "POST",
    data: JSON.stringify(data),
  })
}

// 查看秒杀活动列表
export const getSeckillListApi = (params) => {
  return request({
    url: 'sms/backend/sPromotion/list',
    method: "GET",
    params:params,
  })
}

// 查询单个信息
export const getSeckillInfoApi = (id) => {
  return request({
    url: `sms/backend/sPromotion/info/${id}`,
    method: "GET",
  })
}

// 修改单个信息
export const updateSeckillApi = (data) => {
  return request({
    url: 'sms/backend/sPromotion/update',
    method: "PUT",
    data: JSON.stringify(data),
  })
}
